home *** CD-ROM | disk | FTP | other *** search
/ CICA 1995 August / CICA - The Ultimate Collection of Shareware for Windows (Disc 2) (August 1995).iso / disc2 / programr / atre27.exe / ATREE_27 / NOISYXOR.LF < prev    next >
Text File  |  1992-08-01  |  2KB  |  106 lines

  1. #
  2. #
  3. #---- noisyxor.lf
  4. #
  5. #
  6. #---- This is an lf example that tries to learn the XOR
  7. #---- function of two boolean inputs.  The training is done
  8. #---- with contradictory data.   For each pair of values of the
  9. #---- input, for example A = 1, B = 0, there are four correct
  10. #---- training samples and one incorrect sample in the set.
  11. #---- The optimal decision here is to learn the XOR, but
  12. #---- that may not always happen.  We train for 30 epochs.
  13. #
  14. #---- See example3.lf for explanations of the instructions.
  15.  
  16. tree
  17.  
  18.     size = 15
  19.  
  20.     max epochs  = 30
  21.  
  22.     save tree to "noisyxor.tre"
  23.  
  24. function
  25.  
  26.     domain dimension = 2
  27.  
  28.     codomain dimension = 1
  29.  
  30.     coding = 1:1 1:1 1:1 
  31.  
  32.     quantization = 2 2 2
  33.  
  34.     save coding to "noisyxor.cod"
  35.  
  36.     training set size = 20
  37.  
  38.     training set =
  39.  
  40. # A    B    A xor B (right 4/5 = 80% of the time)
  41.   1    1    0
  42.   1    1    0
  43.   1    1    0
  44.   1    1    0
  45. # next one is noisy
  46.   1    1    1
  47.  
  48.   1    0    1
  49.   1    0    1
  50.   1    0    1
  51.   1    0    1
  52. # next one is noisy
  53.   1    0    0
  54.  
  55.   0    1    1
  56.   0    1    1
  57.   0    1    1
  58.   0    1    1
  59. # next one is noisy
  60.   0    1    0
  61.  
  62.   0    0    0
  63.   0    0    0
  64.   0    0    0
  65.   0    0    0
  66. # next one is noisy
  67.   0    0    1
  68.  
  69.  
  70. #---- We will test on thesame 20 vectors to see if we can get close to 80% right
  71.     test set size = 20
  72.     test set =
  73.  
  74.   1    1    0
  75.   1    1    0
  76.   1    1    0
  77.   1    1    0
  78. # next one is noisy - if ALN learns XOR, then it should get this one wrong
  79.   1    1    1
  80.  
  81.   1    0    1
  82.   1    0    1
  83.   1    0    1
  84.   1    0    1
  85. # next one is noisy - if ALN learns XOR, then it should get this one wrong
  86.   1    0    0
  87.  
  88.   0    1    1
  89.   0    1    1
  90.   0    1    1
  91.   0    1    1
  92. # next one is noisy - if ALN learns XOR, then it should get this one wrong
  93.   0    1    0
  94.  
  95.   0    0    0
  96.   0    0    0
  97.   0    0    0
  98.   0    0    0
  99. # next one is noisy - if ALN learns XOR, then it should get this one wrong
  100.   0    0    1
  101.  
  102.  
  103. #BEST POSSIBLE ERROR HISTOGRAM
  104. #0 errors        16
  105. #1 errors        4
  106.